- If your AI-generated code becomes faulty, who faces the most liability exposure?
- These discoutned earbuds deliver audio so high quality, you'll forget they're mid-range
- This Galaxy Watch is one of my top smartwatches for 2024 and it's received a huge discount
- One of my favorite Android smartwatches isn't from Google or OnePlus (and it's on sale)
- The Urgent Need for Data Minimization Standards
Cisco Catalyst Center Template Labs – Advanced Automation, Part 7 – Cisco Blogs
Overview
In this, the last episode of our ongoing Catalyst Center Automation Series, our focus is on advanced automation methods which allow us to solve various use cases within a network from Catalyst Center. During this lab, we will discuss how to modify various velocity templates to deal with specific use cases so that Catalyst Center provisioning can enable those use cases via automation. This enables you, the network administrator, the ability to solve more types of configuration issues from Catalyst Center and to deal with the dynamics of an enterprise network.
Within this series, we cover the following;
- PnP Preparation – explains the overall Plug and Play set up steps
- Onboarding Templates – explains in-depth how to deploy Day 0 templates
- Day N Templates – dives into Day N template constructs with both regular and composite templates and use cases
- Application Policys – explores Application Policys and SD-AVC in Catalyst Center and their use
- Telemetry – explains how to deploy Telemetry for assurance
- Advanced Automation – explores Advanced Automation techniques
- Dynamic Automation – a deployment lab for dynamic automation
What will I learn in the Advanced Automation Lab?
This is an enablement type module within the Wired Automation lab and it allows customers to reach beyond what they currently understand by trying new concepts, really push the boundaries of automation. During this lab, we will cover various topics with regard to template logic to solve various use cases. We cover some previous concepts with an in-depth focus on broadening their capabilities.
The concept of this lab is for you to rebuild the regular templates to solidify your understanding of templates, and so that you may substitute them into the composite to test with. Different methods for the varying use cases will be given explaining both the pros and cons along the way. Expand your capabilities with this lab and take your abilities to the next level. You’re only inhibited by your own imagination.
Topics
The various topics we will touch on in the lab consist of the following:
- Self-deleting EEM scripts
- Working with Arrays and Methods in Velocity
- Using Conditional Statements for Configuration
- Velocity and Enable versus Interactive mode
- Assigning port configuration in a stack
- Autoconf vs Smartports
- IBNS 2.0 configuration
Use Cases
We will cover the Topics above in a number of use cases to show the capability and flexibility of the templating engine within Catalyst Center. While we will utilize Velocity language the same can be accomplished in the Jinja2 language.
- Renaming interfaces
- Building Stacks
- Assigning port configuration
- Autoconf port configuration
- Non SDA IBNS 2.0 port configuration
With that, the lab covers these topics in-depth;
We will gain a practical understanding of the steps associated with setting up Catalyst Center and an environment to support complex, advanced, regular templates to deliver device configuration during these labs. The labs aim to aid engineers in rapidly beginning using Catalyst Center automation and help them work towards a global template strategy. Additionally, these labs will give customers a permanent place to try out the regular and composite templates and include configurations for various use cases. Finally, this environment will enable engineers to reduce the time and effort needed to instantiate the network.
Additional things covered in the lab;
Autoconf
In these labs, we will use Autoconf which is a solution that can be used to manage port configurations for data or voice VLAN, quality of service (QoS) parameters, storm control, and MAC-based port security on end devices that are deployed in the access layer of a network. Device classification is enabled when you enable the Autoconf feature using the autoconf enable
global configuration mode command. The device detection acts as an event trigger, which in turn applies the appropriate automatic template to the interface. When the Autoconf feature is enabled using the autoconf enable
command, the default Autoconf service policy is applied to all the interfaces. For more information about Autoconf.
Self-Destructing EEM scripts
Self-Destructing EEM scripts are those that delete themselves on termination. Within the EEM script, it has code that removes the EEM applet from the configuration, and then the configuration is written to NVRAM prior to terminating. The uses for such a script are numerous, and this lab covers one specific use case but an imaginative mind can come up with many other uses for such a feature.
IBNS 2.0 Configuration
While not covering all the aspects of IBNS 2.0, we cover the configuration that we may implement in order to allow for automating host onboarding within a non-SD-Access campus network. These concepts while not built into a formal UI within Catalyst Center for legacy networks allow organizations that wish to automate their infrastructure the chance to automate.
The format of the code within all these sections of the lab is in an easy copy-to-paste window allowing you to import them into Catalyst Center simply by pasting them into the editor.
How can I get started?
Within DCLOUD, several sandbox-type labs are available. These self-contained environments are there to allow you to use them as you please within the time scheduled. In addition, this allows us a place to start practicing various concepts without fear of impacting production environments.
As a result, we hope to demystify some of the complexities of setting up automation and help guide customers through the caveats. Therefore, to aid customers in the transition toward automation, we have put together a set of small helpful labs within a GitHub repository. In this way, these self-guided labs provide a glimpse into the fundamentals of building velocity templates and offer examples that you can download and expand from. In addition, the sample templates and JSON files supplied are for easy import into Catalyst Centers’ template editor for quicker adoption. Lastly, some scripts are ready-made excerpts of code that allow you to build the environment to test.
Within the Wired Automation lab, in the Advanced Automation module, we step by step delve into advanced automation methods and ways to utilize them to solve various use cases. Second, we provide answers and explanations to many of the questions that come up during automation workshops. We hope that you find the information both helpful and informative.
Where can I test and try these labs?
DCLOUD Lab Environment
To help customers succeed with Cisco Catalyst Center automation, you may utilize the above labs as they have been designed to work within DCLOUD’s Cisco Enterprise Networks Hardware Sandbox Labs in either:
- Cisco Enterprise Networks Hardware Sandbox West DC
- Cisco Enterprise Networks Hardware Sandbox East DC
The DCLOUD labs allow you to run these labs and gives an environment to try the various code samples. You may choose to develop and export your code for use in production environments. Also, this gives you an environment where you can safely POC/POV methods and steps without harming your production environments. The DCLOUD environment also negates the need for shipping equipment, lead times, and licensing issues needed to get moving rapidly. Please do adhere to the best practices for the DCLOUD environment when using it.
Lab Connectivity
The environment allows for use with a web-based browser client for VPN-less connectivity, access as well as AnyConnect VPN client connectivity for those who prefer it. You may choose from labs hosted out of our San Jose Facilities by selecting US West. Choose the Cisco Enterprise Network Sandbox. To access this or any other content, including demonstrations, labs, and training in DCLOUD please work with your Cisco Account team or Cisco Partner Account Team directly. Your Account teams will schedule the session and share it for you to use. Once booked follow the guide within GitHub to complete the tasks adhering to the best practices of the DCLOUD environment.
Content
The Wired Automation labs, Advanced Automation module content is located within the existing DNAC-TEMPLATES repository to give a one-stop-shop for all the necessary tools, scripts, templates, and code samples. Within it are seven labs, which build upon the tutorials to test the methods in a lab environment. The repository was featured in a previous post on Cisco Blogs about Catalyst Center Templates earlier in May 2021.
Additional Information
Catalyst Center Template Labs
The previously named DNAC Template LABS within the DNAC-TEMPLATES GitHub repository aim to guide you through the typical steps required to enable the various automation tasks delivered by Catalyst Center. This lab will give examples of templates used in Catalyst Center that we can modify for our use and test on equipment within the LAB environment. Additional information within the lab provides a well-rounded explanation of Automation methods with Templates. Lastly, the lab allows for customers to use Catalyst Center workflows to practice deploying Onboarding, DayN Templates, and Application Policy automation on both Wired and Wireless Platforms.
The goal of this lab is for it to be a practical guide to aid engineers to rapidly begin using Catalyst Center automation and help them work towards a deployment strategy. Additionally, this lab will give customers a permanent place to try out the configurations for various use cases. Finally, this environment will enable engineers to reduce the time and effort needed to instantiate the network.
As a result, you will gain experience in setting up Plug and Play onboarding and templates and utilizing all features. Additionally, you will use advanced templating methods and troubleshooting tools. These may help during faultfinding to determine what is failing in a deployment.
Catalyst Center Labs
Please use this menu to navigate the various sections of this GitHub repository. Within the multiple folders are examples and explanation readme files for reference. There are now two sets of labs, and these are being continually expanded upon.
New Catalyst Center Lab Content
Please use this menu to navigate the various sections of this GitHub repository. Within the multiple folders are examples and explanation readme files for reference. There are now two sets of labs, and these are being continually expanded upon.
This newer and more modular lab approach is designed to deal with and includes concepts from the legacy labs in a newer more modular format.
- Lab 1 Wired Automation – Covers green and brown field use cases (allow 4.0 hrs)
- Lab 2 Wireless Automation – Covers traditional wireless automation (allow 4.0 hrs)
- Lab 4 Rest-API Orchestration – Covers automation of Cisco Catalyst Center via Postman with Rest-API (allow 2.0 hrs)
- Lab 7 CICD Orchestration – Covers Python with JENKINS orchestration via REST-API (allow 4.0 hrs)
We will share additional labs and content in an ongoing effort to fulfill all your automation needs with Catalyst Center.
In conclusion, if you found this set of labs and repository helpful,
please fill in comments and feedback on how it could be improved.
We’d love to hear what you think. Ask a question or leave a comment below.
And stay connected with Cisco on social!
Check out our Cisco Networking video channel
Subscribe to the Networking blog
Share: